﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using CRMFramework;
using System.Collections;
using Newtonsoft.Json;
using CRMEntity;

namespace CRMBiz
{
    public static class ApplicationIncomeExpenseHandler
    {
        /// <summary>
        /// function for get selected data
        /// </summary>
        /// <param name="key"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public static DataTable BindDataTableForApplicationIncomeExpense(int appid)
        {
            DataTable dt;
            try
            {
                var para = new[]{
                    DBhelper.SetParameter("@appid",appid.ToString())
                };
                string sql = "SELECT * FROM crm_income_expence_and_repayment where app_id=@appid";
                dt = DBhelper.ExecuteDataset(sql, para).Tables[0];
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return dt;
        }
    }
}
